﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="GuitarChordFinder.Page"
	xmlns:local="clr-namespace:GuitarChordFinder" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" 
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" Background="#FF424242" 
	xmlns:sc="clr-namespace:SilverlightContrib.Controls;assembly=SilverlightContrib.Controls" >
    <UserControl.Resources>
        <local:AudioFileSourceConverter x:Key="myAudioFileSourceConverter" />
    </UserControl.Resources>	<Border CornerRadius="16,16,16,16" Background="#FF424242" Height="455" Width="640">
		<Grid x:Name="LayoutRoot">
			<Grid.RowDefinitions>
				<RowDefinition Height="230"/>
				<RowDefinition Height="65"/>
				<RowDefinition Height="65"/>
				<RowDefinition Height="65"/>
				<RowDefinition Height="30"/>
			</Grid.RowDefinitions>
			<Grid Margin="20,20,20,10" x:Name="fretBoardGrid" Grid.Row="0" RenderTransformOrigin="0.5,0.5">
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="*"/>
				</Grid.ColumnDefinitions>
				<Grid.RenderTransform>
					<TransformGroup>
						<SkewTransform AngleX="-5"/>
					</TransformGroup>
				</Grid.RenderTransform>
				<Grid.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF3A2810" Offset="1"/>
						<GradientStop Color="#998C6527" Offset="0"/>
					</LinearGradientBrush>
				</Grid.Background>
				<Grid.RowDefinitions>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
					<RowDefinition Height="*"/>
				</Grid.RowDefinitions>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="0" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.1"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="1" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.2"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="2" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.4"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="3" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.5"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="4" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.6"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:GuitarString Margin="0,11.5,0,11.5" Grid.Row="5" Grid.ColumnSpan="5" RenderTransformOrigin="0.5,0.5">
					<local:GuitarString.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleY="0.8"/>
						</TransformGroup>
					</local:GuitarString.RenderTransform>
				</local:GuitarString>
				<local:Fret Grid.RowSpan="6" Grid.Column="0" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5">
					<local:Fret.RenderTransform>
						<TransformGroup>
							<ScaleTransform ScaleX="2"/>
						</TransformGroup>
					</local:Fret.RenderTransform>
				</local:Fret>
				<local:Fret Margin="0,0,0,0" Grid.RowSpan="6" Grid.Column="0" HorizontalAlignment="Right"/>
				<local:Fret Margin="0,0,0,0" Grid.RowSpan="6" Grid.Column="1" HorizontalAlignment="Right"/>
				<local:Fret Margin="0,0,0,0" Grid.RowSpan="6" Grid.Column="2" HorizontalAlignment="Right"/>
				<local:Fret Margin="0,0,0,0" Grid.RowSpan="6" Grid.Column="3" HorizontalAlignment="Right"/>
				<local:Fret Margin="0,0,0,0" Grid.RowSpan="6" Grid.Column="4" HorizontalAlignment="Right"/>
				<Ellipse Grid.Column="2" Grid.Row="0" Grid.RowSpan="6" Opacity="0.75" Stroke="#FF000000" StrokeThickness="0" Fill="#BFCFCFCF" Width="20" Height="20"/>
				<Ellipse Grid.Column="4" Grid.Row="0" Grid.RowSpan="6" Opacity="0.75" Stroke="#FF000000" StrokeThickness="0" Fill="#BFCFCFCF" Width="20" Height="20"/>
				<MediaElement Volume="1" AutoPlay="True" x:Name="notePlayer"/>
			</Grid>
			<sc:CoolMenu HorizontalAlignment="Center" Grid.Row="1" x:Name="noteMenu" ItemsSource="{Binding}" Height="70" VerticalAlignment="Center">
				<sc:CoolMenu.ItemTemplate>
					<DataTemplate>
			            			<Image Source="{Binding Mode=OneWay, Path=ImageSource}" Height="36" Width="36" />
			        			</DataTemplate>
			    			</sc:CoolMenu.ItemTemplate>
			</sc:CoolMenu>
			<sc:CoolMenu HorizontalAlignment="Center" Grid.Row="2" x:Name="chordtypeMenu" ItemsSource="{Binding}" Height="70" VerticalAlignment="Center">
				<sc:CoolMenu.ItemTemplate>
					<DataTemplate>
			            			<Image Source="{Binding Mode=OneWay, Path=ImageSource}" Height="36" Width="36" />
			        			</DataTemplate>
			    			</sc:CoolMenu.ItemTemplate>
			</sc:CoolMenu>
			<Button x:Name="btnPlayChord" ToolTipService.ToolTip="Play Chord" Style="{StaticResource ImageButtonStyle}" VerticalAlignment="Center" Grid.Column="1" HorizontalAlignment="Center" Grid.Row="3">
				<Image Source="images/PlaySound.png" Stretch="None"/>
			</Button>
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="SelectedChordPanel" Grid.Row="4">
				<TextBlock Text="{Binding Mode=OneWay, Path=Note.Code}" FontSize="16" Foreground="#FFE7E7E7" HorizontalAlignment="Center" Margin="0,0,4,0" VerticalAlignment="Center"/>
				<TextBlock Text="{Binding Mode=OneWay, Path=ChordType.Code}" FontSize="16" Foreground="#FFE7E7E7" HorizontalAlignment="Center" Margin="4,0,0,0" VerticalAlignment="Center"/>
				<MediaElement HorizontalAlignment="Left" Volume="1" AutoPlay="False" x:Name="chordPlayer" Grid.Row="1" Grid.RowSpan="2" Source="{Binding Mode=OneWay, Path=AudioFileSource, Converter={StaticResource myAudioFileSourceConverter}}" />
			</StackPanel>
		</Grid>
	</Border>
</UserControl>